home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 34.zip
/
BS1 part 34
/
Weubblers handler.adf
/
examples
/
msdos.h
< prev
next >
Wrap
C/C++ Source or Header
|
1988-12-16
|
1KB
|
62 lines
struct MsFileLock
{
BPTR fl_Link;
LONG fl_Key;
LONG fl_Access;
struct MsgPort *fl_Task;
BPTR fl_Volume;
LONG MagicNum;
LONG FirstDirBlock;
LONG DirBlock;
LONG DirPos;
LONG FirstBlock;
};
struct MsDosFile
{
LONG Used;
LONG MagicNum;
LONG FirstCluster;
LONG BufferPosition;
LONG Position;
LONG FileLength;
LONG ClusterPos;
LONG BufferDirty;
LONG LengthDirty;
LONG LastCluster;
LONG DirBlk;
LONG DirPos;
unsigned char Buffer[2048];
};
struct DOSDIR
{
unsigned char FileName[8];
unsigned char Extension[3];
unsigned char Attribute;
unsigned char Padding[10];
short Time;
short Date;
short FirstCluster;
long FileLength;
};
#undef BADDR
#define BADDR(x) ((APTR) ((x)<<2))
#define AADDR(x) ((BPTR) ((x)>>2))
#define CSTR(x) (((char *) BADDR(x))+1)
#define ACTION_FIND_INPUT 1005
#define ACTION_FIND_OUTPUT 1006
#define ACTION_END 1007
#define ACTION_SEEK 1008
#define DOS_TRUE -1
#define DOS_FALSE 0
#define MSDOSTYPE(x) ((x==TypeStandardAddress)||(x==TypeStandardData))
#define AMIGATYPE(x) (x==TypeAmigaDos)
#define FIRSTCLUSTER 26
#define MAXLOCKS 20
#define MAXFILES 5